package structures;

import java.util.*;

/**
 * User
 * @author Jose Antonio Prieto
 */
public class User {

    // =========== Attributes of an Image ===========
    /** Id of the User */
    private String id;
    // =========== User Fields ===========
    /** First name of the user */
    private String firstName;
    /** Last name of the user */
    private String lastName;
    /** Nick name of the user */
    private String nickName;
    /** Home folder of the user */
    private String userDirectory;
    /** Login email of the user */
    private String email;
    

    /**
     * Constructor
     */
    public User() {
        // Atributes Initialization
        id = "";
        // User Fields
        firstName = "";
        lastName = "";
        nickName = "";
        userDirectory = "";
        email = "";
    }

    
    
	/**
	 * Getter
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * Setter
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * Getter
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * Setter
	 * @param firstName the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * Getter
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * Setter
	 * @param lastName the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * Getter
	 * @return the nickName
	 */
	public String getNickName() {
		return nickName;
	}

	/**
	 * Setter
	 * @param nickName the nickName to set
	 */
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	/**
	 * Getter
	 * @return the userDirectory
	 */
	public String getUserDirectory() {
		return userDirectory;
	}

	/**
	 * Setter
	 * @param userDirectory the userDirectory to set
	 */
	public void setUserDirectory(String userDirectory) {
		this.userDirectory = userDirectory;
	}

	/**
	 * Getter
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * Setter
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
     * Print of the User
     * @return
     */
    public String toString() {
    	String res = "<--User-->\n";
        if (!id.equals("")){
            res += "\tID: " + id + "\n";
        }
        res += "\t<--Name-->\n";
        if (!firstName.equals("")){
            res += "\t\tFirst Name: " + firstName + "\n";
        }
        if (!lastName.equals("")){
            res += "\t\tLast Name: " + lastName + "\n";
        }
        if (!nickName.equals("")){
            res += "\tNick Name: " + nickName + "\n";
        }
        if (!userDirectory.equals("")){
            res += "\tUser Directory: " + userDirectory + "\n";
        }
        if (!email.equals("")){
            res += "\tEmail: " + email + "\n";
        }        
        return res;
    }
}	
